import { reqGetSearchList } from "@/api"
const state = {
    SearchList:{}
}
const actions ={
   async getSearchList({commit},val){
       let result = await reqGetSearchList(val);
       if(result.code == 200)
           commit('GETSEARCHLIST',result.data)
       }
   }

const mutations ={
    GETSEARCHLIST(state,searchList){
        state.SearchList = searchList
    }
}
const getters ={
    goodsList(state){
            return state.SearchList.goodsList;
    },
    trademarkList(state){
        return state.SearchList.trademarkList;
    },
    attrsList(state){
        return state.SearchList.attrsList;
    }
}
export default {
    state,
    actions,
    mutations,
    getters
}